
package View;


import java.awt.BorderLayout;
import java.util.ArrayList;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTable;
import model.SuratDokumen;
import model.SuratDokumenTableModel;

public class PanelLihatSuratDokumen extends JPanel {

    private JTable tablePublikasi;
    private JLabel labelPanel;
    private ArrayList<SuratDokumen> data;

    public PanelLihatSuratDokumen(ArrayList<SuratDokumen> data) {
        this.data = data;
        setLayout(new BorderLayout());
        labelPanel = new JLabel("Form Lihat Publikasi");
        labelPanel.setHorizontalAlignment(JLabel.CENTER);
        add(labelPanel, BorderLayout.NORTH);
        tablePublikasi = new JTable();

        tablePublikasi.setModel(new SuratDokumenTableModel(data));
        add(tablePublikasi, BorderLayout.CENTER);
    }

    public ArrayList<SuratDokumen> getData() {
        return data;
    }

    public void setData(ArrayList<SuratDokumen> data) {
        this.data = data;
    }
}